function checkbrowser() 
{ 
  if (navigator.userAgent.indexOf("Opera") != '-1') var brow = "opera";
  else if (navigator.userAgent.indexOf("MSIE 6.") != '-1') var brow = "ie6"; 
  else if (navigator.userAgent.indexOf("MSIE") != '-1') var brow = "ie"; 
  else if (navigator.userAgent.indexOf("Netscape") != '-1') var brow = "nn"; 
  else if (navigator.userAgent.indexOf("Firefox") != '-1') var brow = "firefox"; 
  else if (navigator.userAgent.indexOf("Safari") != '-1') var brow = "safari"; 
  else if (navigator.userAgent.indexOf("Mozilla") != '-1') var brow = "firefox"; 
  return brow; 
} 

if ((checkbrowser()!='opera') && (checkbrowser()!='safari')) {
jQuery(document).ready(function(){
	$("#content .o").hover(
		function () {
			$(this).addClass("hover");
		},
		function () {
			$(this).removeClass("hover");
		}
	);
});
}


var leftpos=0;
var leftx=0;
function shake(){
leftx++;
leftpos=Math.cos(leftx/1.5)*20;
$("#a").css('margin-left',leftpos-100);
  if (leftx<31) {setTimeout('shake()',10);} else {$("#a").css('margin-left',-100); leftx=0; leftpos=0}
}

//Плагин для сабмита форм на AJAX
$.fn.ajaxSubmit = function(e) {
	this.submit(function(){
		var params = {};
		$(this).find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea").filter(":enabled").each(function() { 
			params[ this.name || this.id || this.parentNode.name || this.parentNode.id ] = this.value;
		}); 
		$("body").addClass("load");
		act=this.getAttribute("action");
		if (act=='') act=location.href;
		$.post(act, params, function(data){
			eval(data);
		});
		// хак для 6 ie
		if (checkbrowser()!='ie6') return false;
	});
	return this;
}